package demo.practice.array;


public class P1480 {
    public int[] runningSum(int[] nums) {
        if (nums == null)
            return null;
        int[] sum = new int[nums.length];
        if (nums.length == 0)
            return sum;

        sum[0] = nums[0];
        for (int i = 1; i < nums.length; i++) {
            sum[i] = sum[i - 1] + nums[i];
        }

        return sum;

    }

}
